﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using TrustX.Dados;

namespace AcadPos.Data
{
    public class DBRegra
    {
        #region Obter Regras
        public DataTable obterRegras(string pRegra)
        {
            string SQL = @"SELECT ar.RoleName
                            FROM   aspnet_Roles ar
                            WHERE ar.RoleName LIKE @REGRA + '%'
                            ORDER BY ar.RoleName";
            DataAccess db = new DataAccess(SQL);
            db.AddParam("@REGRA", SqlDbType.VarChar, pRegra);
            return db.GetDataTable();
        }
        #endregion
    }
}
